package com.example.infinitecards;

import java.util.ArrayList;
import java.util.List;

import org.junit.Assert;
import org.junit.Test;

import com.bakerj.infinitecards.Util.ListCheckingUtil;
import com.bakerj.infinitecards.transformer.LinearInterpolator;

/**
 * LinearInterpolatorTestCase
 *
 * @author BakerJ
 * @since : 2021.5.24
 */
public class LinearInterpolatorTestCase {
    /**
     * testLinearInterpolator
     */
    @Test
    public void testLinearInterpolator() {
        float test = 0.5f;
        LinearInterpolator linearInterpolator = new LinearInterpolator();
        float result = linearInterpolator.getInterpolation(test);
        Assert.assertNotNull(result);
        Assert.assertEquals(String.valueOf(result), "0.5");
    }

    /**
     * testListIsNotNull
     */
    @Test
    public void testListIsNotNull () {
        List myList = new ArrayList();
        myList.add("student");
        myList.add("teacher");
        ListCheckingUtil listCheckingUtil = new ListCheckingUtil();
        Boolean result = listCheckingUtil.listIsNull(myList);
        Assert.assertNotNull(result);
        Assert.assertEquals(result, true);
    }

    /**
     * testListIsNull
     */
    @Test
    public void testListIsNull () {
        List myList = new ArrayList();
        ListCheckingUtil listCheckingUtil = new ListCheckingUtil();
        Boolean result = listCheckingUtil.listIsNull(myList);
        Assert.assertNotNull(result);
        Assert.assertEquals(result, false);
    }
}
